<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>新用户注册</title>
    <style>
        body {
            font-family: 'Arial', sans-serif;
            background: linear-gradient(135deg, #4CAF50, #66BB6A);
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            color: #333;
        }

        .form-container {
            background-color: #ffffff;
            padding: 40px;
            border-radius: 12px;
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
            width: 100%;
            max-width: 400px;
            text-align: center;
        }

        .form-container h3 {
            color: #4CAF50;
            font-size: 28px;
            margin-bottom: 20px;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
        }

        label {
            font-size: 16px;
            font-weight: bold;
            display: block;
            text-align: left;
            margin: 10px 0 5px;
        }

        input[type="text"], input[type="password"], input[type="date"], input[type="number"] {
            width: 100%;
            padding: 12px;
            border: 1px solid #ddd;
            border-radius: 8px;
            font-size: 14px;
            box-sizing: border-box;
            background-color: #f9f9f9;
            margin-bottom: 15px;
            transition: border-color 0.3s, box-shadow 0.3s;
        }

        input:focus {
            border-color: #4CAF50;
            box-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
            outline: none;
        }

        button {
            width: 100%;
            padding: 14px;
            background: linear-gradient(135deg, #4CAF50, #66BB6A);
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
            margin-top: 20px;
        }

        button:hover {
            background: linear-gradient(135deg, #45a049, #5da060);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
            transform: translateY(-2px);
        }

        hr {
            border: 0;
            border-top: 1px solid #ddd;
            margin: 20px 0;
        }
    </style>
</head>
<body>
<%
    HttpSession sessionAddUser = request.getSession();
    sessionAddUser.setAttribute("adduserSession", "adduser");
%>
<div class="form-container">
    <h3>新用户注册</h3>
    <form action="${pageContext.request.contextPath}/AdminHomeServlet" method="post">
        <label for="student_name_add">姓名:</label>
        <input type="text" id="student_name_add" name="name" placeholder="如: 李四" required>

        <label for="student_gender_add">性别:</label>
        <input type="text" id="student_gender_add" name="gender" placeholder="如: 男/女" required>

        <label for="student_birth_date_add">出生日期:</label>
        <input type="date" id="student_birth_date_add" name="birth_date">

        <label for="student_major_add">专业:</label>
        <input type="text" id="student_major_add" name="major" placeholder="如: 计算机科学">

        <label for="student_password_add">密码:</label>
        <input type="password" id="student_password_add" name="password" placeholder="如: 123456" required>

        <hr>

        <button type="submit" name="action" value="add_user">注册</button>
    </form>
</div>
</body>
</html>
